﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Xml.Serialization;

namespace BDSim
{
    /// <summary>
    /// 移动用户类型接口
    /// </summary>
    public interface IDynamicUser
    {
        /// <summary>
        /// 轨迹实时仿真
        /// </summary>
        void SimulationTrack();

        /// <summary>
        /// 轨迹导入
        /// </summary>
        void ImportTrack();
    }

    #region 动态用户界面所需的接口定义 暂时放置
    #region 轨迹编辑
    #region ///基本类型
    /// <summary>
    /// 轨迹基类
    /// </summary>
    [XmlRootAttribute("基本属性")]
    public class BaseTrackModel
    {
        [ReadOnly(true), CategoryAttribute("基本属性"), DescriptionAttribute("模型类别"), XmlElement(ElementName = "模型类别")]
        public TrackModelType DeviceModelType { get; set; }
        [ReadOnly(true), CategoryAttribute("基本属性"), DescriptionAttribute("轨迹类别"), XmlElement(ElementName = "轨迹类别")]
        public TrackType DeviceTrackType { get; set; }
        [ReadOnly(true), CategoryAttribute("基本属性"), DescriptionAttribute("运行状态"), XmlElement(ElementName = "运行状态")]
        public ModelState RunState { get; set; }

        [ReadOnly(true), CategoryAttribute("基本属性"), DescriptionAttribute("轨迹ID"), XmlElement(ElementName = "轨迹ID")]
        public string UID { get; set; }
        [CategoryAttribute("基本属性"), DescriptionAttribute("模型名称"), XmlElement(ElementName = "模型名称")]
        public string ModelName { get; set; }
    }

    /// <summary>
    /// 模型类型
    /// </summary>
    public enum TrackModelType
    {
        /// <summary>
        /// 汽车轨迹
        /// </summary>
        CarTrack,
        /// <summary>
        /// 飞机轨迹
        /// </summary>
        AircraftTrack,
        /// <summary>
        /// 轮船轨迹
        /// </summary>
        BoatTrack,
        /// <summary>
        /// 圆周轨迹
        /// </summary>
        CircleTrack,
        /// <summary>
        /// 大圆轨迹
        /// </summary>
        BigCircleTrack,
        /// <summary>
        /// 深度组合圆周轨迹
        /// </summary>
        InterCirTrack,
        /// <summary>
        /// 深度组合直线正弦轨迹
        /// </summary>
        InterLineSinTrack,
        /// <summary>
        /// 深度组合直线轨迹
        /// </summary>
        InterLineTrack
    }
    /// <summary>
    /// 模型状态
    /// </summary>
    public enum ModelState
    {
        /// <summary>
        /// 开始
        /// </summary>
        Start,
        /// <summary>
        /// 运行
        /// </summary>
        Run,
        /// <summary>
        /// 结束
        /// </summary>
        Stop,
    }

    /// <summary>
    /// 轨迹类型
    /// </summary>
    public enum TrackType
    {
        CarStartSetting, CarSteadyVelocityLine, CarAccelerateLine, CarSteadyVelSwerve, CarClimbRun, CarDotRun, CarStopRun,

        AircraftStartSetting, AircraftSteadyVelLine, AircraftAccelerateLine, AircraftClimbRun, AircraftSteadyVelSwerve, AircraftAcceSwerve,
        AircraftPointRun, AircraftCombRun, AircraftStopRun, AircraftLinePitch, AircraftLineLandRoll, AircraftLineNav,

        BoatStartSetting, BoatSteadyVelocityLine, BoatAccelerateLine, BoatSteadyVelSwerve, BoatPointRun, BoatStopRun,

        CircleRun, BigCircleRun, InterCirTrack, InterLineSinTrack, InterLineTrack
    }
    #region 基本运动状态
    /// <summary>
    /// 行驶方式
    /// </summary>
    ///   
    [TypeConverter(typeof(ExpandableObjectConverter)), XmlRootAttribute("RunMethod")]
    public class RunMethod
    {
        private int _RunSelect = 1;
        [DescriptionAttribute("行驶方式选择 1:行驶时间 2：行驶距离 "), XmlElement(ElementName = "RunSelect")]
        public int RunSelect
        {
            get { return _RunSelect; }
            set
            {
                if (value == 1 || value == 2)
                {
                    _RunSelect = value;
                }
            }
        }

        [DescriptionAttribute("行驶值 1:行驶时间(s) 2：行驶距离(m) "), XmlElement(ElementName = "RunValue")]
        public double RunValue { get; set; }//行驶值
    }
    /// <summary>
    /// 加速方式
    /// </summary>
    [TypeConverter(typeof(ExpandableObjectConverter)), XmlRootAttribute("AccelerateMethod")]
    public class AccelerateMethod
    {
        private int _AccelerateSelect = 1;
        [DescriptionAttribute("加速方式选择 1:加速时间 2：加速距离 "), XmlElement(ElementName = "AccelerateSelect")]
        public int AccelerateSelect
        {
            get { return _AccelerateSelect; }
            set
            {
                if (value == 1 || value == 2)
                {
                    _AccelerateSelect = value;
                }
            }
        }

        [DescriptionAttribute("加速值  1:加速时间(s) 2：加速距离(m)"), XmlElement(ElementName = "AccelerateValue")]
        public double AccelerateValue { get; set; }//加速值
    }
    /// <summary>
    /// 速度变化方式
    /// </summary>
    [TypeConverter(typeof(ExpandableObjectConverter)), XmlRootAttribute("VelChangeMethod")]
    public class VelChangeMethod
    {
        private int _VelChangeSelect = 1;
        [DescriptionAttribute("速度变化方式选择 1：变化值 2:最终值"), XmlElement(ElementName = "VelChangeSelect")]
        public int VelChangeSelect
        {
            get { return _VelChangeSelect; }
            set
            {
                if (value == 1 || value == 2)
                {
                    _VelChangeSelect = value;
                }
            }
        }

        [DescriptionAttribute("速度变化值 1：变化值(m/s) 2:最终值(m/s)"), XmlElement(ElementName = "VelChangeValue")]
        public double VelChangeValue { get; set; }//速度变化
    }
    /// <summary>
    /// 方向变化方式
    /// </summary>
    [TypeConverter(typeof(ExpandableObjectConverter)), XmlRootAttribute("OrientationChangeMethod")]
    public class OrientationChangeMethod
    {
        private int _OrientationChangeSelect = 1;
        [DescriptionAttribute("方向变化方式选择 1：变化值 2:最终值"), XmlElement(ElementName = "OrientationChangeSelect")]
        public int OrientationChangeSelect
        {
            get { return _OrientationChangeSelect; }
            set
            {
                if (value == 1 || value == 2)
                {
                    _OrientationChangeSelect = value;
                }
            }
        }
        
        [DescriptionAttribute("方向变化值"), XmlElement(ElementName = "OrientationChangeValue")]
        public double OrientationChangeValue { get; set; }//方向变化
    }
    /// <summary>
    /// 高度变化方式
    /// </summary>
    [TypeConverter(typeof(ExpandableObjectConverter)), XmlRootAttribute("HeightChangeMethod")]
    public class HeightChangeMethod
    {
        private int _HeightChangeSelect = 1;
        [DescriptionAttribute("高度变化方式选择 1：变化值 2:最终值"), XmlElement(ElementName = "HeightChangeSelect")]
        public int HeightChangeSelect
        {
            get { return _HeightChangeSelect; }
            set
            {
                if (value == 1 || value == 2)
                {
                    _HeightChangeSelect = value;
                }
            }
        }

        [DescriptionAttribute("高度变化值 1：变化值(m) 2:最终值(m)"), XmlElement(ElementName = "HeightChangeValue")]
        public double HeightChangeValue { get; set; }//高度变化
    }
    /// <summary>
    /// 停止方式
    /// </summary>
    [TypeConverter(typeof(ExpandableObjectConverter)), XmlRootAttribute("StopMethod")]
    public class StopMethod
    {
        private int _StopSelect = 1;
        [DescriptionAttribute("停止方式选择 1:停止时间 2：停止距离 "), XmlElement(ElementName = "StopSelect")]
        public int StopSelect
        {
            get { return _StopSelect; }
            set
            {
                if (value == 1 || value == 2)
                {
                    _StopSelect = value;
                }
            }
        }

        //private double _StopValue = 10;
        [DescriptionAttribute("停止值  1:停止时间(s) 2：停止距离(m)"), XmlElement(ElementName = "StopValue")]
        public double StopValue { get; set; }//停止
    }
    #endregion
    #endregion

    #region ///汽车轨迹模型
    /// <summary>
    /// 起始设定
    /// </summary>
    [XmlRootAttribute("CarStartSetting")]
    public class CarStartSetting : BaseTrackModel
    {
        private double _Longitude = 120;
        [CategoryAttribute("起始设定参数"), DescriptionAttribute("经度(deg)"), XmlElement(ElementName = "Longitude")]
        //   [DisplayNameAttribute("经度(deg)")]
        public double Longitude { get { return _Longitude; } set { _Longitude = value; } }//经度

        private double _Latitude = 30;
        [CategoryAttribute("起始设定参数"), DescriptionAttribute("纬度(deg)"), XmlElement(ElementName = "Latitude")]
        public double Latitude { get { return _Latitude; } set { _Latitude = value; } }//纬度

        private double _Height = 100;
        [CategoryAttribute("起始设定参数"), DescriptionAttribute("高度(m)"), XmlElement(ElementName = "Height")]
        public double Height { get { return _Height; } set { _Height = value; } }//高度

        [CategoryAttribute("起始设定参数"), DescriptionAttribute("航向(deg)"), XmlElement(ElementName = "NavOrientation")]
        public double NavOrientation { get; set; }//航向

        private double _Velocity = 10;
        [CategoryAttribute("起始设定参数"), DescriptionAttribute("速度(m/s)"), XmlElement(ElementName = "Velocity")]
        public double Velocity { get { return _Velocity; } set { _Velocity = value; } }//速度

        public CarStartSetting()
        {
            DeviceModelType = TrackModelType.CarTrack;
            RunState = ModelState.Start;
            DeviceTrackType = TrackType.CarStartSetting;

        }
    }
    /// <summary>
    /// 稳速直线
    /// </summary>
    [XmlRootAttribute("CarStartSetting")]
    public class CarSteadyVelocityLine : BaseTrackModel
    {
        private RunMethod _runWay = new RunMethod();
        [CategoryAttribute("稳速直线参数")]
        public RunMethod RunWay
        {
            get { return _runWay; }
            set { _runWay = value; }
        }

        public CarSteadyVelocityLine()
        {
            DeviceModelType = TrackModelType.CarTrack;
            RunState = ModelState.Run;
            DeviceTrackType = TrackType.CarSteadyVelocityLine;
        }
    }
    /// <summary>
    /// 加速直线
    /// </summary>
    [XmlRootAttribute("CarAccelerateLine")]
    public class CarAccelerateLine : BaseTrackModel
    {
        private AccelerateMethod _accelerateWay = new AccelerateMethod();
        [CategoryAttribute("加速直线参数")]
        public AccelerateMethod AccelerateWay
        {
            get { return _accelerateWay; }
            set { _accelerateWay = value; }
        }

        private VelChangeMethod _velChangeWay = new VelChangeMethod();
        [CategoryAttribute("加速直线参数")]
        public VelChangeMethod VelChangeWay
        {
            get { return _velChangeWay; }
            set { _velChangeWay = value; }
        }

        public CarAccelerateLine()
        {
            DeviceModelType = TrackModelType.CarTrack;
            RunState = ModelState.Run;
            DeviceTrackType = TrackType.CarAccelerateLine;
        }
    }
    /// <summary>
    /// 稳速转弯
    /// </summary>
    [XmlRootAttribute("CarSteadyVelSwerve")]
    public class CarSteadyVelSwerve : BaseTrackModel
    {
        private OrientationChangeMethod _orientChageWay = new OrientationChangeMethod();
        [CategoryAttribute("稳速转弯参数")]
        public OrientationChangeMethod OrientChageWay
        {
            get { return _orientChageWay; }
            set { _orientChageWay = value; }
        }
        private double _swerveRadius;
        [CategoryAttribute("稳速转弯参数"), DescriptionAttribute("转弯半径(m)")]
        public double SwerveRadius
        {
            get { return _swerveRadius; }
            set { _swerveRadius = value; }
        }

        public CarSteadyVelSwerve()
        {
            DeviceModelType = TrackModelType.CarTrack;
            RunState = ModelState.Run;
            DeviceTrackType = TrackType.CarSteadyVelSwerve;
        }
    }
    /// <summary>
    /// 爬升运动
    /// </summary>
    [XmlRootAttribute("CarClimbRun")]
    public class CarClimbRun : BaseTrackModel
    {

        private HeightChangeMethod _HeightChageWay = new HeightChangeMethod();
        [CategoryAttribute("爬升运动参数")]
        public HeightChangeMethod HeightChageWay
        {
            get { return _HeightChageWay; }
            set { _HeightChageWay = value; }
        }
        private double _runDistance;//运行距离
        [CategoryAttribute("爬升运动参数"), DescriptionAttribute("运行距离(m)")]
        public double RunDistance
        {
            get { return _runDistance; }
            set { _runDistance = value; }
        }

        public CarClimbRun()
        {
            DeviceModelType = TrackModelType.CarTrack;
            RunState = ModelState.Run;
            DeviceTrackType = TrackType.CarClimbRun;
        }
    }
    /// <summary>
    /// 定点运动
    /// </summary>
    [XmlRootAttribute("CarDotRun")]
    public class CarDotRun : BaseTrackModel
    {
        [CategoryAttribute("定点运动参数"), DescriptionAttribute("经度(deg)")]
        public double Longitude { get; set; }//经度
        [CategoryAttribute("定点运动参数"), DescriptionAttribute("纬度(deg)")]
        public double Latitude { get; set; }//纬度
        [CategoryAttribute("定点运动参数"), DescriptionAttribute("高度(m)")]
        public double Height { get; set; }//高度
        private double _swerveRadius;//转弯半径
        [CategoryAttribute("定点运动参数"), DescriptionAttribute("转弯半径(m)")]
        public double SwerveRadius
        {
            get { return _swerveRadius; }
            set { _swerveRadius = value; }
        }
        public CarDotRun()
        {
            DeviceModelType = TrackModelType.CarTrack;
            RunState = ModelState.Run;
            DeviceTrackType = TrackType.CarDotRun;
        }


    }
    /// <summary>
    /// 停止运动
    /// </summary>
    [XmlRootAttribute("CarStopRun")]
    public class CarStopRun : BaseTrackModel
    {
        private StopMethod _stopWay = new StopMethod();
        [CategoryAttribute("停止运动参数")]
        public StopMethod StopWay
        {
            get { return _stopWay; }
            set { _stopWay = value; }
        }

        //无
        //public double _runDistance;//运行距离
        //[DescriptionAttribute("运行距离")]
        //public double RunDistance
        //{
        //    get { return _runDistance; }
        //    set { _runDistance = value; }
        //}

        public CarStopRun()
        {
            DeviceModelType = TrackModelType.CarTrack;
            RunState = ModelState.Stop;
            DeviceTrackType = TrackType.CarStopRun;
        }
    }
    #endregion

    #region ///飞机轨迹模型
    /// <summary>
    /// 起始设定
    /// </summary>
    /// 
    [XmlRootAttribute("AircraftStartSetting")]
    public class AircraftStartSetting : BaseTrackModel
    {
        [CategoryAttribute("起始设定参数"), DescriptionAttribute("经度(deg)")]
        public double Longitude { get; set; }//经度
        [CategoryAttribute("起始设定参数"), DescriptionAttribute("纬度(deg)")]
        public double Latitude { get; set; }//纬度
        [CategoryAttribute("起始设定参数"), DescriptionAttribute("高度(m)")]
        public double Height { get; set; }//高度
        [CategoryAttribute("起始设定参数"), DescriptionAttribute("航向(deg)")]
        public double NavOrientation { get; set; }//航向
        [CategoryAttribute("起始设定参数"), DescriptionAttribute("速度(m/s)")]
        public double Velocity { get; set; }//速度

        public AircraftStartSetting()
        {
            DeviceModelType = TrackModelType.AircraftTrack;
            RunState = ModelState.Start;
            DeviceTrackType = TrackType.AircraftStartSetting;
        }
    }
    /// <summary>
    /// 稳速直线
    /// </summary>
    [XmlRootAttribute("AircraftSteadyVelLine")]
    public class AircraftSteadyVelLine : BaseTrackModel
    {
        private RunMethod _runWay = new RunMethod();
        [CategoryAttribute("稳速直线参数")]
        public RunMethod RunWay
        {
            get { return _runWay; }
            set { _runWay = value; }
        }

        public AircraftSteadyVelLine()
        {
            DeviceModelType = TrackModelType.AircraftTrack;
            RunState = ModelState.Run;
            DeviceTrackType = TrackType.AircraftSteadyVelLine;
        }
    }
    /// <summary>
    /// 加速直线
    /// </summary>
    [XmlRootAttribute("AircraftAccelerateLine")]
    public class AircraftAccelerateLine : BaseTrackModel
    {
        private AccelerateMethod _accelerateWay = new AccelerateMethod();
        [CategoryAttribute("加速直线参数")]
        public AccelerateMethod AccelerateWay
        {
            get { return _accelerateWay; }
            set { _accelerateWay = value; }
        }

        private VelChangeMethod _velChangeWay = new VelChangeMethod();
        [CategoryAttribute("加速直线参数")]
        public VelChangeMethod VelChangeWay
        {
            get { return _velChangeWay; }
            set { _velChangeWay = value; }
        }

        public AircraftAccelerateLine()
        {
            DeviceModelType = TrackModelType.AircraftTrack;
            RunState = ModelState.Run;
            DeviceTrackType = TrackType.AircraftAccelerateLine;
        }
    }
    /// <summary>
    /// 爬升运动
    /// </summary>
    [XmlRootAttribute("AircraftClimbRun")]
    public class AircraftClimbRun : BaseTrackModel
    {
        [CategoryAttribute("爬升运动参数"), DescriptionAttribute("高度变化值(m)")]
        public double DeltaHeight { get; set; }//高度变化值
        [CategoryAttribute("爬升运动参数"), DescriptionAttribute("高度变化率(m/s)")]
        public double DotHeight { get; set; }//高度变化率
        [CategoryAttribute("爬升运动参数"), DescriptionAttribute("起始横向加速度(g)")]
        public double StartAccelaration { get; set; }//起始横向加速度
        [CategoryAttribute("爬升运动参数"), DescriptionAttribute("结束横向加速度(g)")]
        public double StopAccelaration { get; set; }//结束横向加速度

        public AircraftClimbRun()
        {
            DeviceModelType = TrackModelType.AircraftTrack;
            RunState = ModelState.Run;
            DeviceTrackType = TrackType.AircraftClimbRun;
        }
    }

    /// <summary>
    /// 稳速转弯
    /// </summary>
    [XmlRootAttribute("AircraftSteadyVelSwerve")]
    public class AircraftSteadyVelSwerve : BaseTrackModel
    {
        [CategoryAttribute("稳速转弯参数"), DescriptionAttribute("航向变化(deg)")]
        public double NavOrientChageValue { get; set; }//航向变化
        [CategoryAttribute("稳速转弯参数"), DescriptionAttribute("横向加速(g)")]
        public double LandOrientAcceValue { get; set; }// 横向加速   

        public AircraftSteadyVelSwerve()
        {
            DeviceModelType = TrackModelType.AircraftTrack;
            RunState = ModelState.Run;
            DeviceTrackType = TrackType.AircraftSteadyVelSwerve;
        }
    }

    /// <summary>
    /// 加速转弯
    /// </summary>
    [XmlRootAttribute("AircraftAcceSwerve")]
    public class AircraftAcceSwerve : BaseTrackModel
    {
        [CategoryAttribute("加速转弯参数"), DescriptionAttribute("航向变化(deg)")]
        public double NavOrientChageValue { get; set; }//航向变化
        [CategoryAttribute("加速转弯参数"), DescriptionAttribute("横向加速(g)")]
        public double LandOrientAcceValue { get; set; }// 横向加速
        [CategoryAttribute("加速转弯参数"), DescriptionAttribute("速度变化(m/s)")]
        public double VelchageValue { get; set; } //速度变化
        public AircraftAcceSwerve()
        {
            DeviceModelType = TrackModelType.AircraftTrack;
            RunState = ModelState.Run;
            DeviceTrackType = TrackType.AircraftAcceSwerve;
        }
    }
    /// <summary>
    /// 定点行驶
    /// </summary>
    [XmlRootAttribute("AircraftPointRun")]
    public class AircraftPointRun : BaseTrackModel
    {
        [CategoryAttribute("定点运动参数"), DescriptionAttribute("经度(deg)")]
        public double Longitude { get; set; }//经度
        [CategoryAttribute("定点运动参数"), DescriptionAttribute("纬度(deg)")]
        public double Latitude { get; set; }//纬度
        [CategoryAttribute("定点运动参数"), DescriptionAttribute("高度(m)")]
        public double Height { get; set; }//高度
        [CategoryAttribute("定点运动参数"), DescriptionAttribute("横向加速(g)")]
        public double LandOrientAcceValue { get; set; }// 横向加速 

        public AircraftPointRun()
        {
            DeviceModelType = TrackModelType.AircraftTrack;
            RunState = ModelState.Run;
            DeviceTrackType = TrackType.AircraftPointRun;
        }
    }
    /// <summary>
    /// 组合运动
    /// </summary>
    [XmlRootAttribute("AircraftCombRun")]
    public class AircraftCombRun : BaseTrackModel
    {
        [CategoryAttribute("组合运动参数"), DescriptionAttribute("航向变化(deg)")]
        public double NavOrientChageValue { get; set; }//航向变化
        [CategoryAttribute("组合运动参数"), DescriptionAttribute("横向加速(g)")]
        public double LandOrientAcceValue { get; set; }// 横向加速
        [CategoryAttribute("组合运动参数"), DescriptionAttribute("高度变化值(m)")]
        public double DeltaHeight { get; set; }//高度变化值
        [CategoryAttribute("组合运动参数"), DescriptionAttribute("高度变化率(m/s)")]
        public double DotHeight { get; set; }//高度变化率
        [CategoryAttribute("组合运动参数"), DescriptionAttribute("速度变化(m/s)")]
        public double VelchageValue { get; set; } //速度变化

        public AircraftCombRun()
        {
            DeviceModelType = TrackModelType.AircraftTrack;
            RunState = ModelState.Run;
            DeviceTrackType = TrackType.AircraftCombRun;
        }
    }
    /// <summary>
    /// 停止运动
    /// </summary>
    [XmlRootAttribute("AircraftStopRun")]
    public class AircraftStopRun : BaseTrackModel
    {
        public StopMethod _stopWay = new StopMethod();
        [CategoryAttribute("停止运动参数")]
        public StopMethod StopWay
        {
            get { return _stopWay; }
            set { _stopWay = value; }
        }

        public AircraftStopRun()
        {
            DeviceModelType = TrackModelType.AircraftTrack;
            RunState = ModelState.Stop;
            DeviceTrackType = TrackType.AircraftStopRun;
        }
    }
    /// <summary>
    /// 直线俯仰
    /// </summary>
    [XmlRootAttribute("AircraftLinePitch")]
    public class AircraftLinePitch : BaseTrackModel
    {
        [CategoryAttribute("直线俯仰参数"), DescriptionAttribute("运行时间(s)")]
        public double RunTime { get; set; } //运行时间
        [CategoryAttribute("直线俯仰参数"), DescriptionAttribute("俯仰变化(deg)")]
        public double PitchChageValue { get; set; }//俯仰变化

        public AircraftLinePitch()
        {
            DeviceModelType = TrackModelType.AircraftTrack;
            RunState = ModelState.Run;
            DeviceTrackType = TrackType.AircraftLinePitch;
        }
    }
    /// <summary>
    /// 直线横滚
    /// </summary>
    [XmlRootAttribute("AircraftLineLandRoll")]
    public class AircraftLineLandRoll : BaseTrackModel
    {
        [CategoryAttribute("直线横滚参数"), DescriptionAttribute("运行时间(s)")]
        public double RunTime { get; set; } //运行时间
        [CategoryAttribute("直线横滚参数"), DescriptionAttribute("横滚变化(deg)")]
        public double LandRollChageValue { get; set; }//横滚变化

        public AircraftLineLandRoll()
        {
            DeviceModelType = TrackModelType.AircraftTrack;
            RunState = ModelState.Run;
            DeviceTrackType = TrackType.AircraftLineLandRoll;
        }
    }
    /// <summary>
    /// 直线航向
    /// </summary>
    [XmlRootAttribute("AircraftLineNav")]
    public class AircraftLineNav : BaseTrackModel
    {
        [CategoryAttribute("直线航向参数"), DescriptionAttribute("运行时间(s)")]
        public double RunTime { get; set; } //运行时间
        [CategoryAttribute("直线航向参数"), DescriptionAttribute("航向变化(deg)")]
        public double NavChageValue { get; set; }//航向变化

        public AircraftLineNav()
        {
            DeviceModelType = TrackModelType.AircraftTrack;
            RunState = ModelState.Run;
            DeviceTrackType = TrackType.AircraftLineNav;
        }
    }
    #endregion

    #region///轮船轨迹
    /// <summary>
    /// 起始设定
    /// </summary>
    [XmlRootAttribute("BoatStartSetting")]
    public class BoatStartSetting : BaseTrackModel
    {
        [CategoryAttribute("起始设定参数"), DescriptionAttribute("经度(deg)")]
        public double Longitude { get; set; }//经度
        [CategoryAttribute("起始设定参数"), DescriptionAttribute("纬度(deg)")]
        public double Latitude { get; set; }//纬度
        [CategoryAttribute("起始设定参数"), DescriptionAttribute("高度(m)")]
        public double Height { get; set; }//高度
        [CategoryAttribute("起始设定参数"), DescriptionAttribute("航向(deg)")]
        public double NavOrientation { get; set; }//航向
        [CategoryAttribute("起始设定参数"), DescriptionAttribute("速度(m/s)")]
        public double Velocity { get; set; }//速度

        public BoatStartSetting()
        {
            DeviceModelType = TrackModelType.BoatTrack;
            RunState = ModelState.Start;
            DeviceTrackType = TrackType.BoatStartSetting;
        }
    }
    /// <summary>
    /// 稳速直线
    /// </summary>
    [XmlRootAttribute("BoatSteadyVelocityLine")]
    public class BoatSteadyVelocityLine : BaseTrackModel
    {
        public RunMethod _runWay = new RunMethod();
        [CategoryAttribute("稳速直线参数")]
        public RunMethod RunWay
        {
            get { return _runWay; }
            set { _runWay = value; }
        }

        private int _OceanWaveLevel = 1; //海浪等级
        [CategoryAttribute("稳速直线参数"), DescriptionAttribute("海浪等级(0~9)")]
        public int OceanWaveLevel
        {
            get { return _OceanWaveLevel; }
            set
            {
                if (value >= 0 && value <= 9)
                {
                    _OceanWaveLevel = value;
                }

            }
        }
        public BoatSteadyVelocityLine()
        {
            DeviceModelType = TrackModelType.BoatTrack;
            RunState = ModelState.Run;
            DeviceTrackType = TrackType.BoatSteadyVelocityLine;
        }
    }
    /// <summary>
    /// 加速直线
    /// </summary>
    [XmlRootAttribute("BoatAccelerateLine")]
    public class BoatAccelerateLine : BaseTrackModel
    {
        private AccelerateMethod _accelerateWay = new AccelerateMethod();
        [CategoryAttribute("加速直线参数")]
        public AccelerateMethod AccelerateWay
        {
            get { return _accelerateWay; }
            set { _accelerateWay = value; }
        }

        private VelChangeMethod _velChangeWay = new VelChangeMethod();
        [CategoryAttribute("加速直线参数")]
        public VelChangeMethod VelChangeWay
        {
            get { return _velChangeWay; }
            set { _velChangeWay = value; }
        }
        [CategoryAttribute("加速直线参数")]
        private int _OceanWaveLevel = 1; //海浪等级
        [CategoryAttribute("加速直线参数"), DescriptionAttribute("海浪等级(0~9)")]
        public int OceanWaveLevel
        {
            get { return _OceanWaveLevel; }
            set
            {
                if (value >= 0 && value <= 9)
                {
                    _OceanWaveLevel = value;
                }
            }
        }
        public BoatAccelerateLine()
        {
            DeviceModelType = TrackModelType.BoatTrack;
            RunState = ModelState.Run;
            DeviceTrackType = TrackType.BoatAccelerateLine;
        }
    }
    /// <summary>
    /// 稳速转弯
    /// </summary>
    [XmlRootAttribute("BoatSteadyVelSwerve")]
    public class BoatSteadyVelSwerve : BaseTrackModel
    {
        private OrientationChangeMethod _orientChageWay = new OrientationChangeMethod();
        [CategoryAttribute("稳速转弯参数")]
        public OrientationChangeMethod OrientChageWay
        {
            get { return _orientChageWay; }
            set { _orientChageWay = value; }
        }

        [CategoryAttribute("稳速转弯参数"), DescriptionAttribute("转弯半径(m)")]
        public double SwerveRadius { get; set; }//转弯半径

        private int _OceanWaveLevel = 1; //海浪等级
        [CategoryAttribute("稳速转弯参数"), DescriptionAttribute("海浪等级(0~9)")]
        public int OceanWaveLevel
        {
            get { return _OceanWaveLevel; }
            set
            {
                if (value >= 0 && value <= 9)
                {
                    _OceanWaveLevel = value;
                }

            }
        }

        public BoatSteadyVelSwerve()
        {
            DeviceModelType = TrackModelType.BoatTrack;
            RunState = ModelState.Run;
            DeviceTrackType = TrackType.BoatSteadyVelSwerve;
        }
    }
    /// <summary>
    /// 定点行驶
    /// </summary>
    [XmlRootAttribute("BoatPointRun")]
    public class BoatPointRun : BaseTrackModel
    {
        [CategoryAttribute("定点运动参数"), DescriptionAttribute("经度(deg)")]
        public double Longitude { get; set; }//经度
        [CategoryAttribute("定点运动参数"), DescriptionAttribute("纬度(deg)")]
        public double Latitude { get; set; }//纬度
        [CategoryAttribute("定点运动参数"), DescriptionAttribute("高度(m)")]
        public double Height { get; set; }//高度
        [CategoryAttribute("定点运动参数"), DescriptionAttribute("转弯半径(m)")]
        public double SwerveRadius { get; set; }//转弯半径
        private int _OceanWaveLevel = 1; //海浪等级
        [CategoryAttribute("定点运动参数"), DescriptionAttribute("海浪等级(0~9)")]
        public int OceanWaveLevel
        {
            get { return _OceanWaveLevel; }
            set
            {
                if (value >= 0 && value <= 9)
                {
                    _OceanWaveLevel = value;
                }
            }
        }
        public BoatPointRun()
        {
            DeviceModelType = TrackModelType.BoatTrack;
            RunState = ModelState.Run;
            DeviceTrackType = TrackType.BoatPointRun;
        }
    }
    /// <summary>
    /// 停止运动
    /// </summary>
    [XmlRootAttribute("BoatStopRun")]
    public class BoatStopRun : BaseTrackModel
    {
        private StopMethod _stopWay = new StopMethod();
        [CategoryAttribute("停止运动参数")]
        public StopMethod StopWay
        {
            get { return _stopWay; }
            set { _stopWay = value; }
        }

        private double _runDistance;//行驶距离
        [CategoryAttribute("停止运动参数"), DescriptionAttribute("行驶距离(m)")]
        public double RunDistance
        {
            get { return _runDistance; }
            set { _runDistance = value; }
        }

        private int _OceanWaveLevel = 1; //海浪等级
        [CategoryAttribute("停止运动参数"), DescriptionAttribute("海浪等级(0~9)")]
        public int OceanWaveLevel
        {
            get { return _OceanWaveLevel; }
            set
            {
                if (value >= 0 && value <= 9)
                {
                    _OceanWaveLevel = value;
                }
            }
        }
        public BoatStopRun()
        {
            DeviceModelType = TrackModelType.BoatTrack;
            RunState = ModelState.Stop;
            DeviceTrackType = TrackType.BoatStopRun;
        }
    }
    #endregion

    #region///圆周轨迹
    public class CircleRun : BaseTrackModel
    {
        [DescriptionAttribute("经度(deg)")]
        public double Longitude { get; set; }//经度
        [DescriptionAttribute("纬度(deg)")]
        public double Latitude { get; set; }//纬度
        [DescriptionAttribute("高度(m)")]
        public double Height { get; set; }//高度
        [DescriptionAttribute("起始方位(deg)")]
        public double StartPhase { get; set; }//起始方位
        [DescriptionAttribute("速度(m/s)")]
        public double Velocity { get; set; }//速度
        [DescriptionAttribute("半径(m)")]
        public double Radius { get; set; }//半径
        [DescriptionAttribute("运行时间(s)")]
        public double RunTime { get; set; }//运行时间
        public CircleRun()
        {
            DeviceModelType = TrackModelType.CircleTrack;
            DeviceTrackType = TrackType.CircleRun;
        }
    }
    #endregion

    #region///大圆轨迹

    public class BigCircleRun : BaseTrackModel
    {
        [DescriptionAttribute("经度(deg)")]
        public double Longitude { get; set; }//经度
        [DescriptionAttribute("纬度(deg)")]
        public double Latitude { get; set; }//纬度
        [DescriptionAttribute("高度(m)")]
        public double Height { get; set; }//高度
        [DescriptionAttribute("起始航向(deg)")]
        public double StartNavOrient { get; set; }//起始航向
        [DescriptionAttribute("起始速度(m/s)")]
        public double StartVelocity { get; set; }//起始速度

        private RunMethod _runWay = new RunMethod();

        public RunMethod RunWay
        {
            get { return _runWay; }
            set { _runWay = value; }
        }

        public BigCircleRun()
        {
            DeviceModelType = TrackModelType.BigCircleTrack;
            DeviceTrackType = TrackType.BigCircleRun;
        }

    }
    #endregion

    #region///深度组合圆周轨迹模型

    public class InterCirTrack : BaseTrackModel
    {
        [DescriptionAttribute("经度(deg)")]
        public double Longitude { get; set; }//经度
        [DescriptionAttribute("纬度(deg)")]
        public double Latitude { get; set; }//纬度
        [DescriptionAttribute("高度(m)")]
        public double Height { get; set; }//高度
        [DescriptionAttribute("静止时间(s)")]
        public double SleepTime { get; set; }//静止时间
        [DescriptionAttribute("航向(deg)")]
        public double NavOrientation { get; set; }//航向
        [DescriptionAttribute("俯仰(deg)")]
        public double Pitch { get; set; }//俯仰
        [DescriptionAttribute("半径(m)")]
        public double Radius { get; set; }//半径、
        public double AngleVelocity { get; set; }//角速度
        [DescriptionAttribute("相关时间(s)")]
        public double RelatTime { get; set; }//相关时间
        [DescriptionAttribute("运动时间(s)")]
        public double RunTime { get; set; }//运动时间

        public InterCirTrack()
        {
            DeviceModelType = TrackModelType.InterCirTrack;
            DeviceTrackType = TrackType.InterCirTrack;
        }
    }
    #endregion

    #region///深组合直线正弦轨迹模型

    public class InterLineSinTrack : BaseTrackModel
    {
        [DescriptionAttribute("经度(deg)")]
        public double Longitude { get; set; }//经度
        [DescriptionAttribute("纬度(deg)")]
        public double Latitude { get; set; }//纬度
        [DescriptionAttribute("高度(m)")]
        public double Height { get; set; }//高度
        [DescriptionAttribute("静止时间(s)")]
        public double SleepTime { get; set; }//静止时间
        [DescriptionAttribute("航向(deg)")]
        public double NavOrientation { get; set; }//航向
        [DescriptionAttribute("俯仰(deg)")]
        public double Pitch { get; set; }//俯仰
        [DescriptionAttribute("幅度(m)")]
        public double Amliphy { get; set; }//幅度
        [DescriptionAttribute("角速度")]
        public double AngleVelocity { get; set; }//角速度
        [DescriptionAttribute("相关时间(s)")]
        public double RelatTime { get; set; }//相关时间
        [DescriptionAttribute("运动时间(s)")]
        public double RunTime { get; set; }//运动时间

        public InterLineSinTrack()
        {
            DeviceModelType = TrackModelType.InterLineSinTrack;
            DeviceTrackType = TrackType.InterLineSinTrack;
        }
    }
    #endregion

    #region///深组合直线轨迹模型

    public class InterLineTrack : BaseTrackModel
    {
        [DescriptionAttribute("经度(deg)")]
        public double Longitude { get; set; }//经度
        [DescriptionAttribute("纬度(deg)")]
        public double Latitude { get; set; }//纬度
        [DescriptionAttribute("高度(m)")]
        public double Height { get; set; }//高度
        [DescriptionAttribute("静止时间(s)")]
        public double SleepTime { get; set; }//静止时间
        [DescriptionAttribute("航向(deg)")]
        public double NavOrientation { get; set; }//航向
        [DescriptionAttribute("俯仰(deg)")]
        public double Pitch { get; set; }//俯仰
        [DescriptionAttribute("加加速度(m/s3)")]
        public double AcceAcce { get; set; }
        [DescriptionAttribute("周期(s)")]
        public double Period { get; set; }//
        [DescriptionAttribute("运动时间(s)")]
        public double RunTime { get; set; }//运动时间

        public InterLineTrack()
        {
            DeviceModelType = TrackModelType.InterLineTrack;
            DeviceTrackType = TrackType.InterLineTrack;
        }
    }
    #endregion
    #region ///基本数据
   

    /// <summary>
    /// 海浪等级水平
    /// </summary>

    public class OceanWaveLevel : INotifyPropertyChanged
    {
        
        [DescriptionAttribute("Roll幅度")]
        public double _RollAmp;//幅度

        public double RollAmp
        {
            get { return _RollAmp; }
            set { _RollAmp = value; NotifyPropertyChanged("RollAmp"); }
        }
        [DescriptionAttribute("Roll频率")]
        public double _RollFreq;//Roll频率

        public double RollFreq
        {
            get { return _RollFreq; }
            set { _RollFreq = value; NotifyPropertyChanged("RollFreq"); }
        }
        [DescriptionAttribute("Roll相位")]
        public double _RollPhase;//Roll相位

        public double RollPhase
        {
            get { return _RollPhase; }
            set { _RollPhase = value; NotifyPropertyChanged("RollPhase"); }
        }
        [DescriptionAttribute("Heave幅度")]
        public double _HeaveAmp;//Heave幅度

        public double HeaveAmp
        {
            get { return _HeaveAmp; }
            set { _HeaveAmp = value; NotifyPropertyChanged("HeaveAmp"); }
        }
        [DescriptionAttribute("Heave频率")]
        public double _HeaveFreq;//Heave频率

        public double HeaveFreq
        {
            get { return _HeaveFreq; }
            set { _HeaveFreq = value; NotifyPropertyChanged("HeaveFreq"); }
        }
        [DescriptionAttribute("Heave相位")]
        public double _HeavePhase;//Heave相位

        public double HeavePhase
        {
            get { return _HeavePhase; }
            set { _HeavePhase = value; NotifyPropertyChanged("HeavePhase"); }
        }
        [DescriptionAttribute("Pitch幅度")]
        public double _PitchAmp;//Pitch幅度

        public double PitchAmp
        {
            get { return _PitchAmp; }
            set { _PitchAmp = value; NotifyPropertyChanged("PitchAmp"); }
        }
        [DescriptionAttribute("Pitch频率")]
        public double _PitchFreq;//Pitch频率

        public double PitchFreq
        {
            get { return _PitchFreq; }
            set { _PitchFreq = value; NotifyPropertyChanged("PitchFreq"); }
        }
        [DescriptionAttribute("Pitch相位")]
        public double _PitchPhase;//Pitch相位

        public double PitchPhase
        {
            get { return _PitchPhase; }
            set { _PitchPhase = value; NotifyPropertyChanged("PitchPhase"); }
        }

        #region///PropertyChanged接口
        public event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged(string Info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(Info));
            }
        }
        #endregion
    }
    /// <summary>
    /// 直线动态限值
    /// </summary>

    public class LineRunLimt : INotifyPropertyChanged
    {
        private double _MaxVel;//最大速度

        public double MaxVel
        {
            get { return _MaxVel; }
            set { _MaxVel = value; NotifyPropertyChanged("MaxVel"); }
        }

        private double _MaxAccelarate;//最大加速度

        public double MaxAccelarate
        {
            get { return _MaxAccelarate; }
            set { _MaxAccelarate = value; NotifyPropertyChanged("MaxAccelarate"); }
        }

        private double _MaxAcceAcce;//最大加加速度

        public double MaxAcceAcce
        {
            get { return _MaxAcceAcce; }
            set { _MaxAcceAcce = value; NotifyPropertyChanged("MaxAcceAcce"); }
        }
        #region///PropertyChanged接口
        public event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged(string Info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(Info));
            }
        }
        #endregion
    }
    /// <summary>
    /// 航向角限值
    /// </summary>

    public class OritatonAngleLimt : INotifyPropertyChanged
    {

        private double _MaxAngleVel;//最大角速度

        public double MaxAngleVel
        {
            get { return _MaxAngleVel; }
            set { _MaxAngleVel = value; NotifyPropertyChanged("MaxAngleVel"); }
        }

        private double _MaxAngleAccelarate;//最大角加速度

        public double MaxAngleAccelarate
        {
            get { return _MaxAngleAccelarate; }
            set { _MaxAngleAccelarate = value; NotifyPropertyChanged("MaxAngleAccelarate"); }
        }

        private double _MaxAngleAcceAcce;//最大角加加速度

        public double MaxAngleAcceAcce
        {
            get { return _MaxAngleAcceAcce; }
            set { _MaxAngleAcceAcce = value; NotifyPropertyChanged("MaxAngleAcceAcce"); }
        }

        #region///PropertyChanged接口
        public event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged(string Info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(Info));
            }
        }
        #endregion
    }
    /// <summary>
    /// 俯仰角限值
    /// </summary>

    public class PitchLimt : INotifyPropertyChanged
    {
        private double _MaxAngle;//最大角度

        public double MaxAngle
        {
            get { return _MaxAngle; }
            set { _MaxAngle = value; NotifyPropertyChanged("MaxAngle"); }
        }

        private double _MaxAngleVel;//最大角速度

        public double MaxAngleVel
        {
            get { return _MaxAngleVel; }
            set { _MaxAngleVel = value; NotifyPropertyChanged("MaxAngleVel"); }
        }

        private double _MaxAngleAccelarate;//最大角加速度

        public double MaxAngleAccelarate
        {
            get { return _MaxAngleAccelarate; }
            set { _MaxAngleAccelarate = value; NotifyPropertyChanged("MaxAngleAccelarate"); }
        }

        private double _MaxAngleAcceAcce;//最大角加加速度

        public double MaxAngleAcceAcce
        {
            get { return _MaxAngleAcceAcce; }
            set { _MaxAngleAcceAcce = value; NotifyPropertyChanged("MaxAngleAcceAcce"); }
        }

        #region///PropertyChanged接口
        public event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged(string Info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(Info));
            }
        }
        #endregion
    }
    /// <summary>
    /// 横滚角限值
    /// </summary>

    public class LandRollLimt : INotifyPropertyChanged
    {
        private double _MaxAngle;//最大角度

        public double MaxAngle
        {
            get { return _MaxAngle; }
            set { _MaxAngle = value; NotifyPropertyChanged("MaxAngle"); }
        }

        private double _MaxAngleVel;//最大角速度

        public double MaxAngleVel
        {
            get { return _MaxAngleVel; }
            set { _MaxAngleVel = value; NotifyPropertyChanged("MaxAngleVel"); }
        }

        private double _MaxAngleAccelarate;//最大角加速度

        public double MaxAngleAccelarate
        {
            get { return _MaxAngleAccelarate; }
            set { _MaxAngleAccelarate = value; NotifyPropertyChanged("MaxAngleAccelarate"); }
        }

        private double _MaxAngleAcceAcce;//最大角加加速度

        public double MaxAngleAcceAcce
        {
            get { return _MaxAngleAcceAcce; }
            set { _MaxAngleAcceAcce = value; NotifyPropertyChanged("MaxAngleAcceAcce"); }
        }

        #region///PropertyChanged接口
        public event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged(string Info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(Info));
            }
        }
        #endregion
    }
    /// <summary>
    /// 侧向角限值
    /// </summary>

    public class LateralLimt : INotifyPropertyChanged
    {
        private double _MaxAccelarate;//最大加速度

        public double MaxAccelarate
        {
            get { return _MaxAccelarate; }
            set { _MaxAccelarate = value; NotifyPropertyChanged("MaxAccelarate"); }
        }

        private double _MaxAcceAcce;//最大加加速度

        public double MaxAcceAcce
        {
            get { return _MaxAcceAcce; }
            set { _MaxAcceAcce = value; NotifyPropertyChanged("MaxAcceAcce"); }
        }
        #region///PropertyChanged接口
        public event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged(string Info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(Info));
            }
        }
        #endregion
    }


    #endregion
    #endregion
    #endregion 动态用户界面所需的接口定义 暂时放置
}
